<template>
  <div>
    <div class="main">
      <div class="dog">
        <img :src="dogImgUrl" alt="" />
      </div>
      <span @click="clickFn">{{ dogName }}</span>
    </div>
  </div>
</template>

<script>
export default {
  props: ['dogImgUrl', 'dogName', 'index'],
  methods: {
    clickFn() {
      this.$emit('jieShao', this.index)
      console.log('点击了')
    },
  },
}
</script>

<style>
.main {
  width: 200px;
  height: 220px;
  margin-right: 50px;
  float: left;
  border: 1px solid black;
  text-align: center;
}
.dog {
  width: 200px;
  height: 200px;
}
img {
  height: 100%;
  width: 100%;
}
</style>
